<?php
namespace Amis\dataviewer;

use Amis\Basics\AmisBasics;

class Mapping extends AmisBasics
{
    public string $type = 'mapping';

    public function className(string $className)
    {
        $this->className = $className;
        return $this;
    }

    public function placeholder(string $placeholder)
    {
        $this->placeholder = $placeholder;
        return $this;
    }

    /**
     * 映射配置
     * @param $map
     * @return $this
     */
    public function map($map)
    {
        $this->map = $map;
        return $this;
    }

    /**
     * API 或 数据映射
     * @param $source
     * @return $this
     */
    public function source($source)
    {
        $this->source = $source;
        return $this;
    }
}